/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.openbravo.bean;

import cn.ekuma.data.dao.bean.I_AutoGeneratorStringKey;
import cn.ekuma.data.dao.bean.I_ModifiedLogBean;
import java.util.Date;

/**
 *
 * @author Administrator
 */
public class Serving implements I_ModifiedLogBean<String>,I_AutoGeneratorStringKey{
     /**
	 * 
	 */
	private static final long serialVersionUID = -2484936285414213413L;
	private String m_sId;//编号
     private String m_sName;//暂存名
     private String m_sServiceId;//服务对应编号
     protected double rantPrice;//压金
     protected String rantCycleStyle;//计租周期
     protected double cyclePrice;//周期租金
     protected  Date rantData;//出借时间
     protected  Date returnData;//归还时间
     protected double priceRate;//价格折扣
    private Date lastModified;


    public Serving(Service service,double rantPrice){
         this.m_sServiceId = service.getId();
         this.rantPrice = rantPrice;
         this.rantCycleStyle=service.getRantCycleStyle();
         this.cyclePrice=service.getCyclePrice();
         rantData=new Date();
         priceRate=1;
    }

    public Serving() {
         this.m_sServiceId = null;
         this.m_sName=null;
         this.rantPrice = 0;
         this.rantCycleStyle=Service.RANTCYCLESTYLE_everyDay;
         this.cyclePrice=0;
         rantData=new Date();
         priceRate=1;
    }

    public double getCyclePrice() {
        return cyclePrice;
    }

    public void setCyclePrice(double cyclePrice) {
        this.cyclePrice = cyclePrice;
    }

    public String getM_sId() {
        return m_sId;
    }

    public void setM_sId(String m_sId) {
        this.m_sId = m_sId;
    }

    public String getM_sServiceId() {
        return m_sServiceId;
    }

    public void setM_sServiceId(String m_sServiceId) {
        this.m_sServiceId = m_sServiceId;
    }

    public String getRantCycleStyle() {
        return rantCycleStyle;
    }

    public void setRantCycleStyle(String rantCycleStyle) {
        this.rantCycleStyle = rantCycleStyle;
    }

    public Date getRantData() {
        return rantData;
    }

    public void setRantData(Date rantData) {
        this.rantData = rantData;
    }

    public double getRantPrice() {
        return rantPrice;
    }

    public void setRantPrice(double rantPrice) {
        this.rantPrice = rantPrice;
    }

    public Date getReturnData() {
        return returnData;
    }

    public void setReturnData(Date returnData) {
        this.returnData = returnData;
    }

    public boolean isClosed(){
        if(this.returnData!=null)
            return true;
        return false;
    }

    public String getM_sName() {
        return m_sName;
    }

    public void setM_sName(String m_sName) {
        this.m_sName = m_sName;
    }

    public String getKey() {
        return this.m_sId;
    }

    public Date getLastModified() {
        return lastModified;
    }

    public void setLastModified(Date lastModified) {
        this.lastModified = lastModified;
    }

    public void setKey(String key) {
        this.m_sId=key;
    }

    public double getPriceRate() {
        return priceRate;
    }

    public void setPriceRate(double priceRate) {
        this.priceRate = priceRate;
    }
}
